ThreadLocalFormatCache

class ThreadLocalFormatCache(val capacity: Int = 20, baseCacheFactory: () -> FormatCache = { DefaultFormatCache() }) : FormatCache

Native implementation of a format cache using threadLocals. Note that this uses a fifo queue of caches (up to capacity count) and it will evict the oldest element (independent of usage)

Constructors

Link copied to clipboard
constructor(capacity: Int = 20, baseCacheFactory: () -> FormatCache = { DefaultFormatCache() })

Properties

Link copied to clipboard
val capacity: Int = 20

Functions

Link copied to clipboard
Link copied to clipboard
open fun getCompositeDescriptor(    codecConfig: XML.XmlCodecConfig,     serializerParent: SafeParentInfo,     tagParent: SafeParentInfo,     preserveSpace: TypePreserveSpace): XmlCompositeDescriptor
Link copied to clipboard
open fun lookupDescriptorOrStore(    overridenSerializer: KSerializer<*>?,     serializerParent: SafeParentInfo,     tagParent: SafeParentInfo,     canBeAttribute: Boolean,     defaultValue: () -> XmlDescriptor): XmlDescriptor
Link copied to clipboard
open fun lookupTypeOrStore(namespace: Namespace?, serialDesc: SerialDescriptor, defaultValue: () -> XmlTypeDescriptor): XmlTypeDescriptor
open fun lookupTypeOrStore(parentName: QName, serialDesc: SerialDescriptor, defaultValue: () -> XmlTypeDescriptor): XmlTypeDescriptor
Link copied to clipboard
open fun <R> useUnsafe(action: (FormatCache) -> R): R